package com.example.demo.config;

import com.example.demo.interceptor.Authlnterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.concurrent.atomic.AtomicInteger;

@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    @Autowired
    private Authlnterceptor authlnterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(authlnterceptor).addPathPatterns("/auth/**");
    }
}
